package cn.bdqn.sshaction;

import cn.bdqn.entity.Address;
import cn.bdqn.entity.User;

import com.opensymphony.xwork2.ActionSupport;

public class ShowAction extends ActionSupport{

	//成员变量
	private User user;
	private String massage;
	
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public String getMassage() {
		return massage;
	}
	public void setMassage(String massage) {
		this.massage = massage;
	}
	
	//重写 execute         原始类型和包装类型显示
	@Override
	public String execute(){
		
		user = new User();
		user.setName("jason");
		user.setAge(20);
		Address address= new Address();
		address.setCountry("中国");
		address.setCity("北京");
		address.setStreet("成府路");
		user.setAddress(address);
		this.massage = "展示原始类型和包装类型,JavaBean";
		return "success";
		
	}
	
}
